package account.command;

import java.sql.SQLException;
import java.util.ArrayList;


import account.dao.DrlDAO;
import account.dao.factory.DAOAbstractFactory;
import account.model.DrlModel;

public class SaveDrlCommand implements Command {

	public DrlModel inModel;
	public DrlModel outModel;

	@Override
	public void execute() throws CommandException {
		ArrayList< DrlModel > models = new ArrayList<DrlModel>();
		models.add(inModel);
		
		DrlDAO drlDAO = DAOAbstractFactory.getFactory().getDrlDAO();
		try {
			outModel = drlDAO.saveDrl(models).get(0);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
